import Vue from 'vue'
import VueRouter from "vue-router";
import home from "@/views/home";
import user from "@/views/user";
import Main from "@/views/Main";
import Mall from "@/views/Mall";
import PageOne from "@/views/PageOne";
import PageTwo from "@/views/PageTwo";
Vue.use(VueRouter)
const routes=[
    {
        path:'/',
        component: Main,
        redirect:'/home',
        children:[
            {path:'home',component:home},
            {path:'user',component: user},
            {path:'mall',component: Mall},//商品管理
            {path:'page1',component: PageOne},
            {path:'page2',component: PageTwo},
        ]
    }
]
const router=new VueRouter({
    routes
})
export default router